﻿$(function () {
    /*******使用Ajax 方式处理传输*******/
    var uploader = $('#uploadShopLogo').uploader({
        url: '/common/Ajax_Thumb',
        fileExts: 'jpg;png;gif;',
        handleType: '1',
        text: '选择图片',
        onSuccess: function (data) {
            $('#PreviewShopLogo').attr('src', data.Data.small);
        }
    });

    /*******使用Ajax 方式处理传输*******/
    var uploader = $('#uploadShopQRCode').uploader({
        url: '/common/Ajax_Thumb',
        fileExts: 'jpg;png;gif;',
        handleType: '1',
        text: '选择图片',
        onSuccess: function (data) {
            $('#PreviewShopQRCode').attr('src', data.Data.small);
        }
    });
});

function SubShopInfo() {
    var model = {};
    model.Id = $("#Id").val();
    model.MarketId = $("#MarketId option:selected").val();
    model.GId = $("#GId option:selected").val();
    model.ShopName = $("#ShopName").val();
    model.ShopLogo = $("#PreviewShopLogo")[0].src;
    model.ShopQRCode = $("#PreviewShopQRCode")[0].src;
    model.Description = $("#Description").val();
    model.ShopAddress = $("#ShopAddress").val();
    DoPostAction(model, "/Goods/EditShop");
}